package com.oa.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oa.Response.ResponseData;
import com.oa.entity.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface UserMapper extends BaseMapper<User> {
//  User login(@Param("user") User user);
  User findByNameAndPassword(@Param("username") String username,@Param("password") String password);
  User findByName(@Param("username") String username);
  void addRole( @Param("userId") Integer userId,@Param("roleId") Integer roleId);

  List<User> getUserBySomething(Object msg);

}
